package bbcom.traversing;

import bbcom.ScenarioType;
import bbcom.control.BBCoMSettings;
import bbcom.interfaces.IScenarioParser;

import java.util.List;

/**
 * Created by Thanh-Trung Pham.
 */
public class BBCoMSharedTraversing {
    /**
     * Get the sorted allocation names.
     *
     * @param scenario           the scenario.
     * @param allAllocationNames all the allocation names.
     * @return the sorted allocation names.
     * @throws Exception if there is an error.
     */
    public static List<String> getSortedAllocationNames(ScenarioType scenario, List<String> allAllocationNames) throws Exception {
        if(scenario == null){
            return allAllocationNames;
        }

        IScenarioParser oIScenarioParser = BBCoMSettings.getInstance().getScenarioParserPlugin();
        return oIScenarioParser.getSortedAllocationNames(scenario, allAllocationNames);
    }




}
